package Spring;

/**
 * @program: planet-company
 * @description:
 * @author: jyz
 * @create: 2019-09-24 19:31
 **/
public class Test4 {
    public static void main(String[] rgs) {

        String ss ="abber";
        int start, end;
        char ch;
        for (int i=0;i<ss.length();i++){
            ch = ss.charAt(i);
            start = ss.indexOf(ch);
            end = ss.lastIndexOf(ch);
            if (start ==end){

                System.out.println(i+1);
                break;
            }

        }

    }

}
